From 84100601f3257d8a2a47d99956df59c9fdba612c Mon Sep 17 00:00:00 2001 From: parkrrrr Date: Wed, 17 May 2006 20:28:39 +0000 Subject: [PATCH] added xcsv-derivative logic --- gpsbabel/xmldoc/makedoc | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/gpsbabel/xmldoc/makedoc b/gpsbabel/xmldoc/makedoc index 0b44516f2..2a7ad3710 100755 --- a/gpsbabel/xmldoc/makedoc +++ b/gpsbabel/xmldoc/makedoc @@ -73,6 +73,7 @@ print FORMATS qq(\n); @formats = `gpsbabel -^3`; $going = 0; +$dooptions = 0; for (@formats) { chomp; @@ -87,9 +88,12 @@ for (@formats) { close FILE; $going = 0; } + if ( $line[5] eq 'xcsv' ) { + $line[0] = 'file'; + } } - elsif (($line[0] eq 'file') || ($line[0] eq 'serial')) { + if (($line[0] eq 'file') || ($line[0] eq 'serial')) { if ($going) { print FILE "\n"; close FILE; @@ -111,8 +115,20 @@ END print FILE expandoptions($line[1]); include($id,'formats'); $going = 1; + $dooptions = 1; + if ( defined($line[5]) && ($line[5] ne $line[2]) ) { + print FILE < +This format is derived from the $line[5] +format, so it has all of the same objects as that format. + +END + if ($line[5] eq 'xcsv' ) { + $dooptions=0; + } + } } - elsif ($going && ($line[0] eq 'option')) { + elsif ($going && $dooptions && ($line[0] eq 'option')) { $nid = 'fmt_'.$id.'_o_'.$line[2]; print FILE < -- 2.30.2